package com.kingwang.training.designpattern.interpreter.bo;

import java.util.Map;

/**
 * @author King
 */
public class SubExpression extends SymbolExpression {
    public SubExpression(Expression left, Expression right) {
        super(left, right);
    }

    @Override
    public Double interpret(Map<String, Double> variables) {
        return this.left.interpret(variables) - this.right.interpret(variables);
    }
}
